Page({
  data: {
    isAgree: false,
    buttonColor: '#eee', 
    buttonTextColor: '#999'
  },
  handleAgreementChange: function (e) {
    const { isAgree, buttonColor } = this.data;
    // 取反当前的isAgree状态
    const newIsAgree =!isAgree; 
    // 根据新的isAgree状态设置按钮颜色
    const newButtonColor = newIsAgree? '#2d4581' : '#eee';
    const newButtonTextColor = newIsAgree? 'white' : '#999';
    this.setData({
      isAgree: newIsAgree,
      buttonColor: newButtonColor,
      buttonTextColor: newButtonTextColor
    });
  },
  navigateToVerificationCode: function() {
    wx.navigateTo({
      url: '/pages/VerificationCode/VerificationCode' // 请确保路径正确，根据实际项目路径修改
    })
  }
});